import styles from './index.module.scss'
import Dialog from '@c/dialog'
import { useSetUserInfo } from '@/utils/hooks'

const Index = ({ onClose }) => {
  const [_, setUserInfo] = useSetUserInfo()

  const close = () => {
    setUserInfo(localStorage.getItem('token'))
    onClose()
  }
  return (
    <Dialog className={styles.content}>
      <img alt="背景" src="/images/convert-bg.webp" className={styles.contentBg} />
      <div className={styles.bg}>
        <img src="/images/convert-sure.webp" className={styles.sureBtn} alt="确定" onClick={close} />
      </div>
    </Dialog>
  )
}

export default Index
